Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle exec addr errors better - don't let IgnoreBadMemoryAccesses skip dispatcher exceptions #14085

Merged
merged 4 commits into from
Feb 9, 2021

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Feb 9, 2021

Skipping these would then just fall through into the compiler and die.

Should remove one of the "mystery" crashes from #14082.

x86 and ARM64 only for now, only tested on x86. will finish up tomorrow.

It handles this fine now (nice bluescreen):

hrydgard/pspautotests@1047400

@unknownbrackets
Copy link
Collaborator

Hm, it'd be nice to keep it as an exec exception though? Or maybe not ever ignore bad jumps to invalid in Core_ExecException()?

-[Unknown]

@hrydgard
Copy link
Owner Author

hrydgard commented Feb 9, 2021

Yeah I'm not super happy with that either, this was just late night hacking to catch the error. I'll see what I can do.

…ip dispatcher exceptions.

It would then just fall through into the compiler and die.

Should remove one of the "mystery" crashes from #14082.
@hrydgard hrydgard force-pushed the catch-bad-exec-addr branch from 21fae17 to f6b2070 Compare February 9, 2021 08:38
@hrydgard hrydgard marked this pull request as ready for review February 9, 2021 08:38
@@ -274,6 +274,11 @@ void Jit::Compile(u32 em_address) {
ClearCache();
}

if (!Memory::IsValidAddress(em_address)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this in ArmJit and Arm64Jit?

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we need it at all. I think when using the JIT, the exception handler will always catch it in the dispatcher.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there's some other path we end up in Compile, I dunno...

@hrydgard hrydgard merged commit 3af26a2 into master Feb 9, 2021
@hrydgard hrydgard deleted the catch-bad-exec-addr branch February 9, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants